<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js"> <!--<![endif]-->
<head>
    <base href="/">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Eureka</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" href="static/css/wro.css">

</head>

<body id="one">
<nav class="navbar navbar-default" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href=""><span></span></a>
            <button type="button" class="navbar-toggle" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
    {{/*<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <li>
                    <a href="">Home</a>
                </li>
                <li>
                    <a href="/lastn">Last 1000 since startup</a>
                </li>
            </ul>
        </div>*/}}
    </div>
</nav>


<div class="container-fluid xd-container">
    <h1>System Status</h1>
    <div class="row">
        <div class="col-md-12">
            <table id='instances' class="table table-condensed table-striped table-hover">
                <tr>
                    <td>Current time</td>
                    <td>{{.CurrentTime}}</td>
                </tr>
            </table>
        </div>
    </div>

    <h1>DS Replicas</h1>
    <ul class="list-group">
    {{range $key, $value := .AvailableRegisters }}
        <li class="list-group-item"><a href="{{$value.HomePageUrl}}">{{$value.InstanceId}}</a></li>
    {{end}}
    </ul>

    <h1>Instances currently registered with Eureka</h1>
    <table id='instances' class="table table-striped table-hover">
        <thead>
        <tr>
            <th>Application</th>
            <th>AMIs</th>
            <th>Available</th>
            <th>InAvailable</th>
        </tr>
        </thead>
        <tbody>
        {{range $key, $value := .EurekaInstances }}
        <tr>
            <td><b>{{$value.Name}}</b></td>
            <td>
                <b>{{$value.AMIs}}</b>
            </td>
            <td>
                <b>{{$value.AvailableHtml}}</b>
            </td>
            <td>
                <b>{{$value.InAvailableHtml}}</b>
            </td>
        </tr>
        {{end}}
        </tbody>
    </table>

    <h1>General Info</h1>

    <table id='generalInfo' class="table table-striped table-hover">
        <thead>
        <tr>
            <th>Name</th>
            <th>Value</th>
        </tr>
        </thead>
        <tbody>
        {{range $key, $value := .GeneralInfo }}
        <tr>
            <td>{{$key}}</td>
            <td>{{$value}}</td>
        </tr>
        {{end}}
        </tbody>
    </table>

    <h1>Instance Info</h1>

    <table id='instanceInfo' class="table table-striped table-hover">
        <thead>
        <tr>
            <th>Name</th>
            <th>Value</th>
        </tr>
        <thead>
        <tbody>
        {{range $key, $value := .InstanceInfo }}
        <tr>
            <td>{{$key}}</td>
            <td>{{$value}}</td>
        </tr>
        {{end}}
        </tbody>
    </table>
</div>
<script type="text/javascript" src="static/js/wro.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('table.stripeable tr:odd').addClass('odd');
        $('table.stripeable tr:even').addClass('even');
    });
</script>
</body>
</html>

